package edu.whu.powersoap;

public class UserInfo {

	public static long FLAG_ADMIN = 0x0001;

	private String name;
	private String password;
	private long flag;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public long getFlag() {
		return flag;
	}

	public void setFlag(long flag) {
		this.flag = flag;
	}

	public boolean isAdmin() {
		return ((flag & FLAG_ADMIN) == FLAG_ADMIN);
	}

	@Override
	public String toString() {
		return "UserInfo [name=" + name + ", password=" + password + ", flag="
				+ Long.toHexString(flag) + "]";
	}

}
